package com.dragon.design.pattern.creational.singleton;

public class EnumSingleton {

    private EnumSingleton() {

    }

    private enum EnumInstance {
        INSTANCE;
        private EnumSingleton enumSingleton;

        EnumInstance() {
            enumSingleton = new EnumSingleton();
        }
    }

    public static EnumSingleton getInstance() {
        return EnumInstance.INSTANCE.enumSingleton;
    }
}
